﻿using DK.LinkedList;

Console.WriteLine("Linked List Test. \n");
var list = new DK.LinkedList.LinkedList<string>();
list.Add("诸葛亮")
    .Add("刘备")
    .Add("关羽")
    .Add("张飞");

Console.WriteLine("ini data.");
Console.WriteLine(list.ToString());

list.Update(1, "蟹不肉")
    .Delete(2);
list.Add(1, "赵云");

Console.WriteLine("update data.");
Console.WriteLine(list.ToString());

Console.WriteLine("Get:赵云 => "+ list.GetOf("赵云").ToString());
Console.WriteLine("Get:倒数第1个元素 => " + list.GetReverse(0)?.ToString());